﻿using System.ComponentModel;

namespace NoteHelper.Model
{
	public class ArticleAttribute
	{
        [MinInt(0)]
		[DisplayName("文章ID")]
        public int ArticleID { get; set; }

		[DisplayName("文章类型ID")]
        public int ArticleTypeID { get; set; }

		[DisplayName("文章")]
		public virtual Article Article { get; set; }

		[DisplayName("文章类型")]
		public virtual ArticleType ArticleType { get; set; }

		public string ChName
		{
		    get
		    {
		        if (ArticleType == null) return "";

                return ArticleType.ChName;
		    }
		}
	}
}
